<div class="blazorise-codeblock">
<div class="csharp"><pre>
<span class="keyword">using</span> Blazorise;
<span class="keyword">using</span> Blazorise.Bootstrap5;
<span class="keyword">using</span> Blazorise.Icons.FontAwesome;
<span class="keyword">using</span> BlazoriseSampleApplication;
<span class="keyword">using</span> Microsoft.AspNetCore.Components.Web;
<span class="keyword">using</span> Microsoft.AspNetCore.Components.WebAssembly.Hosting;

<span class="keyword">namespace</span> Company.WebApplication1
{
    <span class="keyword">public</span> <span class="keyword">class</span> Program
    {
        <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">async</span> Task Main( <span class="keyword">string</span>[] args )
        {
            <span class="keyword">var</span> builder = WebAssemblyHostBuilder.CreateDefault( args );
            builder.RootComponents.Add&lt;App&gt;( <span class="string">&quot;#app&quot;</span> );
            builder.RootComponents.Add&lt;HeadOutlet&gt;( <span class="string">&quot;head::after&quot;</span> );

            builder.Services.AddScoped( sp =&gt; <span class="keyword">new</span> HttpClient { BaseAddress = <span class="keyword">new</span> Uri( builder.HostEnvironment.BaseAddress ) } );

            builder.Services
                .AddBlazorise( options =&gt;
                {
                    options.Immediate = <span class="keyword">true</span>;
                } )
                .AddBootstrap5Providers()
                .AddFontAwesomeIcons();

            <span class="keyword">await</span> builder.Build().RunAsync();
        }
    }
}
</pre></div>
</div>
